<?php

	/**
	* @author Robbie Vasquez
 	* @author Matt Kennedy
 	*
	* @param username
 	* @param miles
 	* @param kilometers
	* @param comments
	* @param runID
	* @param date
 	*/
	
class Stats extends Model
{
	//creating variables
	var $username = '';
	var $miles = '';
	var $kilometers = '';
	var $comments = '';
	var $runID = '';
	var $date = '';
	
	public function Stats()
	{
		// Call the model constructor
		parent::Model();
		
		$this->load->database();
	}
	
	
	function data()
	{
		$username = $_SESSION['username'];
	
		$info = $this->db->get_where('runs', "isDeleted != '1' AND username = '$username'")->result();
		
		/*
		$sql = "SELECT * FROM routes WHERE userID='" . $_SESSION['userID'] . "' AND isDeleted!=1";
		$result = mysql_query($sql) or die(mysql_error());
		$pull = mysql_fetch_array($result) or die(mysql_error());
		*/
		
		return $info;
	}
}


/* EOF */